<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class DeviceType extends Model
{
    public $fillable = [
    	'type',
    ];

    public function devices()
    {
    	return $this->hasMany('App\Models\Device', 'type_id', 'id');
    }

    public function userInfos()
    {
    	return $this->hasManyThrough('App\Models\Device', 'App\Models\UserDevice', 'type_id', 'device_id');
    }
}
